/*河南星辰软件科技有限公司
@copyright Copyright (c) 2010~2022 All rights reserved.
*/
package cn.javaxc.system.action.system;
import java.io.*;
import java.util.*;
import java.sql.*;
import cn.javaxc.model.base.SQL;
import cn.javaxc.model.base.SQLList;
import cn.javaxc.model.base.SQLMap;
import cn.javaxc.model.base.SQLParam;
import cn.javaxc.model.page.BatisPage;
import cn.javaxc.mvcwork.controller.web.TreeBean;
import cn.javaxc.mvcwork.util.common.CommonUtil;
import cn.javaxc.mvcwork.util.common.MapListUtil;
import cn.javaxc.mvcwork.util.helper.FrameHelper;
import cn.javaxc.mvcwork.util.helper.TreeTableHelper;
import org.springframework.beans.factory.annotation.Autowired;
import cn.javaxc.system.action.base.BaseAction;
import cn.javaxc.system.mapper.system.FolderPublicMapper;
public class FolderPublic extends BaseAction
{
    @Autowired(required=false)
	private FolderPublicMapper mapper;
    /**
    公共文件夹
    */
    
    public Map folderPublic() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        TreeBean tb;
        
        tb = createTreeBean("s_folders_treecols");
        tb.setPrefix("img");
        SQLList<SQLMap> s_folders=mapper.s_folders(params);
        s_folders = s_folders.buildTree(tb,tb.getPid());
        result.put("s_folders", s_folders);
        
        return result;
    }
    /**
    转移文件
    */
    
    public Map pubFileTransfer() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        TreeBean tb;
        
        tb = createTreeBean("s_folders_treecols");
        tb.setPrefix("img");
        SQLList<SQLMap> s_folders=mapper.s_folders(params);
        s_folders = s_folders.buildTree(tb,tb.getPid());
        result.put("s_folders", s_folders);
        
        return result;
    }
    /**
    新文件夹修改
    */
    
    public Map pubFolderAddSubmit() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        params.def("CMIDSEL1",-1);
        int i_folder = mapper.i_folder(params);
        result.put("i_folder", i_folder);
        
        return result;
    }
    /**
    转移文件修改
    */
    
    public Map pubFileTransferSubmit() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        mapper.pubFileTransferSubmit(params);
        
        return result;
    }
    /**
    */
    
    public Map move_files() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        mapper.move_files(params);
        
        return result;
    }
}